package czx.wt.util.response;

/**
 * @Author:ChenZhiXiang
 * @Description:
 * @Date:Created in 14:29 2018/8/30
 * @Modified By:
 */
public enum CommResponseEnum implements IResponseEnum {

    SUCCESS(200,"操作成功"),
    FAILURE(0,"未知错误"),

    USER1(1001,"账号不存在"),
    USER2(1002,"密码或用户名错误"),



    validCode1(2001,"验证码错误"),
    validCode2(2002,"验证码过期"),

    //系统类型
    APIERROR1(4001, "缺少文件参数"),
    APIERROR2(4002, "解密失败"),
    APIERROR3(4003, "模拟http请求失败"),
    APIERROR4(4004, "文件下载失败"),
    APIERROR5(4005, "参数错误"),
    APIERROR6(4006, "输入包含敏感字符"),
    APIERROR7(4007, "天气接口调用失败"),
    APIERROR8(4008,"图片大小不能超过1M");
    private int code;
    private String msg;

    CommResponseEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String msg() {
        return this.msg;
    }
}
